﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoardersAgentSim.Agent;

namespace RoardersAgentSim.Map
{
	/// <summary>
	/// Define a path -> a list of links to follow 
	/// </summary>
	public class LinkPath
	{
        /// <summary>
        /// description of the links to go to
        /// </summary>
        public LinkedList<RoadLink> RoadLinks { get; set; }
        /// <summary>
        /// constructor
        /// </summary>
        public LinkPath()
        {
            RoadLinks = new LinkedList<RoadLink>();
        }
        /// <summary>
        /// 
        /// </summary>
        public string Description
        {
            get
            {
                if(this.RoadLinks==null || !this.RoadLinks.Any())
                    return "";
                return string.Join(" --- ", this.RoadLinks.Select(x => x.Description).ToList<String>());
            }
        }
	}
}
